package com.jt.auth.feign;

import com.jt.auth.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author 金帮嘉诚 @date 2021-08-31 星期二 17:27
 */

/**
 * 写完在启动类上 加上 @EnableFeignClient 注解
 */
@FeignClient(name = "sca-system", contextId = "remoteUserService"
)
public interface RemoteUserService {
    @GetMapping("/user/login/{username}")
    User selectUserByUsername(@PathVariable("username") String username);

    @GetMapping("/user/permission/{userId}")
    List<String> listPermissions(@PathVariable("userId") Long userId);
}
